/*
 * error.h
 *
 *  Created on: 21/09/2013
 *      Author: AXL
 *
 *  Funciones para el manejo de errores.
 */

#ifndef ERROR_H_
#define ERROR_H_

#include <stdio.h>

typedef enum
{
	NO_ERROR,
	ARGS_REQUIRED,
	INVALID_NUM_ARGS,
	INVALID_COMMAND,
	FILE_ALREADY_ADDED,
	FILE_NOT_ADDED,
	COMMIT_FAIL,
	ROLLBACK_FAIL,
	INVALID_REV,
	GET_INFO_ERROR,
	UNVERSION_FAIL
} t_error;

/**
 * Registra `message` en `stderr`.
 */
void error( const char* message );

/**
 * Registra en `stderr` el error correspondiente a `t_error`.
 */
void printError( t_error );

#endif /* ERROR_H_ */
